package com.wisdomparking.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.wisdomparking.bean.Manager;
import com.wisdomparking.dao.mapper.ManagerMapper;

@Component
public class ManagerDao implements ManagerMapper {
	
	@Autowired ManagerMapper managerMapper;
	
	@Transactional
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return managerMapper.deleteByPrimaryKey(id);
	}
	
	@Transactional
	@Override
	public int insert(Manager record) {
		return managerMapper.insert(record);
	}
	
	@Transactional
	@Override
	public int insertSelective(Manager record) {
		return managerMapper.insertSelective(record);
	}
	
	@Override
	public Manager selectByPrimaryKey(Integer id) {
		return managerMapper.selectByPrimaryKey(id);
	}
	
	@Override
	public Manager selectByUserName(String userName){
		return managerMapper.selectByUserName(userName);
	}
	
	@Override
	public Manager selectByMobile(String mobile){
		return managerMapper.selectByMobile(mobile);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKeySelective(Manager record) {
		return managerMapper.updateByPrimaryKeySelective(record);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKey(Manager record) {
		return managerMapper.updateByPrimaryKey(record);
	}
	
	@Override
	public List<Manager> getManagerList(Map<String, Object> map) {
		return managerMapper.getManagerList(map);
	}

	@Override
	public long getCountByManager(Map<String, Object> map) {
		return managerMapper.getCountByManager(map);
	}

}
